#!/bin/bash
. /etc/profile

rm -rf statnohup.err
echo [`date`] starting stat ......

cs='.:'
curr="`pwd`/bin"
curr=$curr:"`pwd`/conf"
libpath="`pwd`/lib/"
FILES=`ls $libpath`
for txt in $FILES;do
    cs=$cs$libpath$txt:
done

cs=$cs$curr

echo $cs

pid=`cat index.pid`
kill -9 $pid
nohup java -Dspuindex -Xms256m -Xmx1024m -XX:-UseGCOverheadLimit -cp $cs com.dhgate.spu.analysis.stat.AttrMatchMain $* 1>spu.log 2>spu.err &
echo $! >index.pid&